feat(cli): add redacted share bundles#235
Open
ozymandiashh wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
Validation run on macOS arm64 with real local usage data. No project names, prompts, paths, session IDs, or internal product details are included here. Commands run:
Results:
Caveat: the generated bundle can still contain conversation text in |
Contributor
Author
|
Follow-up patch rebased onto current What changed:
Validation/proof:
No local project names, prompts, paths, session IDs, or usage details are included here. |
c6b2403 to
397a118
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CodeBurn users sometimes need to share enough local telemetry to debug provider parsing, cost attribution, or a suspicious session, but the existing JSON/reporting surfaces are not safe to paste into GitHub issues. Raw reports can include project names, absolute local paths, prompts, shell fragments, emails, and tokens.
This adds
codeburn share, a local-only redacted JSON support bundle. It keeps the useful debugging structure (projects, sessions, turns, models, token usage, tools, activity categories, and costs) while replacing sensitive strings with stable placeholders such as[project:1],[path:1],[email:1], and[secret:1].What changed
codeburn sharewith period, custom date range, provider, project, exclude, output-path, and--include-promptsoptions.src/share.tsfor buildingcodeburn.share.v1bundles from parsed project summaries.userMessage: null; prompt text is only included through explicit--include-promptsopt-in.redaction.promptsmetadata so bundle consumers can distinguishomittedfromredacted.--projectand--exclude.Privacy model
The command does not upload anything and does not add a support service. It writes a local JSON file and tells users to review the output before posting it publicly. Redaction is intentionally best-effort: it covers common leak patterns while preserving enough structure for maintainers to understand parser and cost attribution issues.
Prompt text is omitted by default.
--include-promptsis intended only for cases where maintainers explicitly need prompt text, and even then prompt redaction is best-effort.The tests construct secret-like fixture values at runtime instead of storing literal credentials in the repository, so the redaction cases remain covered without tripping repository secret scanning.
Validation
npx vitest run tests/share.test.ts tests/export.test.ts tests/cli-date.test.ts— 25/25 tests passed.npm run build— passed.git diff --check— passed.redaction.prompts=omitted,non_null_user_messages=0; temporary bundle deleted after the check.